<?php 
include('../common/common.php');
include('../common/checksession.php');
checksession("../index.php");
include('../../inc/conn.php');

$att_id=$_GET['id'];
if(!preg_match("/^[a-z]+$/i",$att_id)){
	showmsg_h("操作失败,请重新操作!","../moduls/arc_att.php");
	die;
}

$db=db_connect();
$sql_count=select_sql("`att_id`","`".PRETABLE."arcatt`","`att_id`='".$att_id."'");
$sql="DELETE FROM `".PRETABLE."arcatt` WHERE CONVERT(`att_id` USING utf8) = '".$att_id."' ";
$rs=$db->query($sql_count);
if(!$rs->num_rows){
	showmsg_h("操作失败,请重新操作!","../moduls/arc_att.php");
	die;
}
if(!$db->query($sql)){
	showmsg_h("操作失败,请重新操作!","../moduls/arc_att.php");
	die;
}

showmsg_h("操作成功!","../moduls/arc_att.php");
$rs->close();
$db->close();
?>